<%@ page import="java.util.function.BiConsumer" %>
<%@ page import="java.io.IOException" %>
<%@ page import="java.util.Map" %>
<%@ page import="java.util.stream.Collectors" %>
<%@ page import="java.util.AbstractMap" %><%--
  Created by IntelliJ IDEA.
  User: cva
  Date: 18-12-28
  Time: 下午5:06
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<%
    request.setCharacterEncoding("UTF-8");
    Map<String,String[]> maps=request.getParameterMap();
    Map<String,String> kvpairs=maps.entrySet().parallelStream().map(e->{
        Map.Entry<String,String> ret=new AbstractMap.SimpleEntry(e.getKey(),e.getValue()[0]);
        return ret;
    }).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
    String str=kvpairs.entrySet()
            .parallelStream()
            .map(e->String.format("%s->%s",e.getKey(),e.getValue()))
            .reduce((x,y)->String.format("%s<br>%s",x,y)).get();
%>

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
<%=str%>
</body>
</html>